package com.pijunn.shipping



import grails.test.mixin.*
import org.junit.*

import com.pijunn.common.Dimensions;
import com.pijunn.shipping.ShippingRate;


/**
 * See the API for {@link grails.test.mixin.domain.DomainClassUnitTestMixin} for usage instructions
 */
@TestFor(ShippingRate)
class ShippingRateTests {

    void testSomething() {
		def shippingRates = []
		def dimensions = new Dimensions(height: 1, width: 1, depth: 1)
		shippingRates << new ShippingRate(packageType: 'type1', emptyWeight: 1, dimensions: dimensions).save(flush:true)
		shippingRates << new ShippingRate(packageType: 'type2', emptyWeight: 2, dimensions: dimensions).save(flush:true)
       
		int expectedCount = 2
		def rates = ShippingRate.list()
		assertEquals "Unexpected rates count", 2, rates.size()
    }
}
